﻿namespace ICMRemoteEdu
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using ICMRemoteEdu.Classes;

    [Serializable]
    public class ICMPartition : ICMObject
    {
        private string _hashCode = string.Empty;
        private List<ICMLesson> _lessons = new List<ICMLesson>();
        private string _url = string.Empty;

        public static bool GetByHash(ICMPartition partition, string partitionHash)
        {
            return (partition.GetHashCode().ToString() == partitionHash);
        }

        public string GetFullURL()
        {
            return (Directory.GetCurrentDirectory() + @"\" + this._url);
        }

        public string HashCode
        {
            get
            {
                return this._hashCode;
            }
            set
            {
                this._hashCode = value;
            }
        }

        public List<ICMLesson> Lessons
        {
            get
            {
                return this._lessons;
            }
        }

        public string URL
        {
            get
            {
                return this._url;
            }
            set
            {
                this._url = value;
            }
        }
    }
}

